/*
 *The code is written by 51jiecai.com.
 *All rights reserved.
 */
package creational.design.patterns.singleton;

/**
 *
 *@author forgkan Created on 2015年4月23日
 *
 */
public class ThreadSafeSingleton {

	private static ThreadSafeSingleton instance ;
	
	private ThreadSafeSingleton() {
	}
	
	public static synchronized ThreadSafeSingleton getInstance() {
		if(instance == null) {
			instance = new ThreadSafeSingleton();
		}
		
		return instance;
	}
	
}
